﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AspNetCs.Common;
using AspNetCs.Bll;

public partial class AjaxXml_UserName_Check : BasePage
{
    private Users User_Bll = new Users();
    string NewsUser = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        int result = 0;//可以使用

        if (Request["NewsUser"] + "" != "")
        {
            NewsUser = Request["NewsUser"].ToString().Trim();
        }
        foreach (string str in StringHelper.SplitString(configInfo.UserName_RegDisabled, "|"))
        {
            if (NewsUser.ToLower().Trim() == str.Trim().ToLower())
            {
                result = -1;//表示该用户名为禁止注册的用户名

                break;
            }
        }
        if (result == 0)
        {
            result = User_Bll.IsObjUserName(NewsUser);
        }



        Response.Write(result);
    }
}
